const express = require('express');

const app = express();

// 路径和方法都匹配的中间件
app.use((res, req, next) => {
    console.log('common middleWare');
    next();
})

app.get('/home', (req, res, next) => {
    console.log('path and method middleWare');
})

app.post('/login', (req, res, next) => {
    console.log('login path and method middleWare');
})

app.listen(8000, () => {
    console.log('express服务器启动成功');
})